/*********************************************************************
* File: IAgent.h
*
* Agent interface
*********************************************************************/
#pragma once

#include "../game/IWorld.h"
using namespace game;
#include "interfaces/ICollisionHandler.h"
#include "interfaces/ICollisionManager.h"
#include "interfaces/INavigation.h"
#include "interfaces/IFreeNavigation.h"
#include "interfaces/IReactiveWaypointNavigation.h"
#include "interfaces/IWaypointNavigation.h"
#include "interfaces/ICombat.h"
#include "interfaces/IFinances.h"
#include "interfaces/ICommunication.h"
#include "interfaces/IVision.h"
#include "interfaces/IHearing.h"
#include "interfaces/IRadar.h"
using namespace agents::interfaces;

namespace agents{
	/**
	* \class IAgent
	* \brief The agent interface.
	*
	* Provides access to the agent's beliefs, sensors and actuators.
	*
	* \author Instituto Superior Tecnico de Lisboa, Portugal
	* \author Technical University of Lisbon, Portugal
	* 
	* \author Agentes Autonomos e Sistemas Multiagente
	* \author Autonomous Agents and Multiagent Systems
	* 
	* \version	1.0
	* \date		2006/2007
	**/
	class IAgent
	{
	public:
		/**
		* \brief Gets the agent's unique identifier.
		*
		* Upon creation, each agent is given a unique integer identifier. 
		**/
		virtual int getUniqueId() = 0;
		/**
		* \brief Gets the agent's name.
		*
		* This is the name defined in the configuration file ('aasmCsAgents.cfg').
		* If not set in the file, the name is automatically assigned. 
		* This name should be unique. 
		**/
		virtual char* getName() = 0;
		/**
		* \brief Gets the agent's team.
		**/
		virtual CounterStrikeTeams::Enumeration getTeam() = 0;

		/**
		* \brief Gets the agent's health.
		*
		* Health is an integer in the range [0;100].
		* If health is 0, the agent.
		**/
		virtual int getHealth() = 0;
		/**
		* \brief Whether the agent has taken damage in the previous cycle.
		**/
		virtual bool hasTakenDamage() = 0;

		/**
		* \brief Gets the world interface.
		**/
		virtual IWorld& getWorld() = 0;
		/**
		* \brief Gets the collision handler.
		**/
		virtual ICollisionHandler& getCollisionHandler() = 0;
		/**
		* \brief Gets the collision manager.
		**/
		virtual ICollisionManager& getCollisionManager() = 0;
		/**
		* \brief Gets the navigation interface.
		**/
		virtual INavigation& getNavigation() = 0;
		/**
		* \brief Gets the free navigation interface.
		**/
		virtual IFreeNavigation& getFreeNavigation() = 0;
		/**
		* \brief Gets the reactive waypoint navigation interface.
		**/
		virtual IReactiveWaypointNavigation& getReactiveWaypointNavigation() = 0;
		/**
		* \brief Gets the waypoint navigation interface.
		**/
		virtual IWaypointNavigation& getWaypointNavigation() = 0;
		/**
		* \brief Gets the combat interface.
		**/
		virtual ICombat& getCombat() = 0;
		/**
		* \brief Gets the finances interface.
		**/
		virtual IFinances& getFinances() = 0;
		/**
		* \brief Gets the communication interface.
		**/
		virtual ICommunication& getCommunication() = 0;
		/**
		* \brief Gets the vision interface.
		**/
		virtual IVision& getVision() = 0;
		/**
		* \brief Gets the hearing interface.
		**/
		virtual IHearing& getHearing() = 0;
		/**
		* \brief Gets the radar interface.
		**/
		virtual IRadar& getRadar() = 0;
		
	protected:
		/**
		* \brief The agent decision cycle.
		*
		* Specialized agents should define their behavior in this method.
		**/
		virtual void think() = 0;
	};
}
